package com.hsnn.medstgmini.pro.base.model;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

/**
 * @category 备案采购实体类
 * @author 韩守松
 * @date 2015年6月19日
 */
@Entity
@Table(name = "base_bakpurchase")
public class BaseBakpurchase implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 4705121131445157032L;
	private String bakPurId;// 备案采购id
	private String bakHospCode;// 备案医疗机构id
	private String drugCode;// 药品编码
	private Double purPrice;// 采购价格
	private Integer purAmount;// 采购数量
	private String delCode;// 配送企业id
	private Short isLongtimePlan;// 是否长期备案0非长期1长期
	private String bakReason;// 备案理由
	private String remark;// 备注
	private Date bakSubmitDatetime;// 备案提交时间
	private String bakSubmitUser;// 备案提交人
	private Short auditStatus;// 审核状态0未审核1通过1不通过
	private String auditRemaks;// 审核备注
	private Date auditDatetime;// 审核时间
	private String auditUser;// 审核人

	private Integer oldStatus;

	// Constructors

	/** default constructor */
	public BaseBakpurchase() {
	}

	/** minimal constructor */
	public BaseBakpurchase(String bakPurId) {
		this.bakPurId = bakPurId;
	}

	/** full constructor */
	public BaseBakpurchase(String bakPurId, String bakHospCode,
			String drugCode, Double purPrice, Integer purAmount,
			String delCode, Short isLongtimePlan, String bakReason,
			String remark, Timestamp bakSubmitDatetime, String bakSubmitUser,
			Short auditStatus, String auditRemaks, Timestamp auditDatetime,
			String auditUser) {
		this.bakPurId = bakPurId;
		this.bakHospCode = bakHospCode;
		this.drugCode = drugCode;
		this.purPrice = purPrice;
		this.purAmount = purAmount;
		this.delCode = delCode;
		this.isLongtimePlan = isLongtimePlan;
		this.bakReason = bakReason;
		this.remark = remark;
		this.bakSubmitDatetime = bakSubmitDatetime;
		this.bakSubmitUser = bakSubmitUser;
		this.auditStatus = auditStatus;
		this.auditRemaks = auditRemaks;
		this.auditDatetime = auditDatetime;
		this.auditUser = auditUser;
	}

	// Property accessors
	@Id
	@GenericGenerator(name = "generator", strategy = "uuid")
	@GeneratedValue(generator = "generator")
	@Column(name = "bak_pur_id", unique = true, nullable = false, length = 36)
	public String getBakPurId() {
		return this.bakPurId;
	}

	public void setBakPurId(String bakPurId) {
		this.bakPurId = bakPurId;
	}

	@Column(name = "bak_hosp_code", length = 36)
	public String getBakHospCode() {
		return this.bakHospCode;
	}

	public void setBakHospCode(String bakHospCode) {
		this.bakHospCode = bakHospCode;
	}

	@Column(name = "drug_code", length = 36)
	public String getDrugCode() {
		return this.drugCode;
	}

	public void setDrugCode(String drugCode) {
		this.drugCode = drugCode;
	}

	@Column(name = "pur_price", precision = 18, scale = 3)
	public Double getPurPrice() {
		return this.purPrice;
	}

	public void setPurPrice(Double purPrice) {
		this.purPrice = purPrice;
	}

	@Column(name = "pur_amount")
	public Integer getPurAmount() {
		return this.purAmount;
	}

	public void setPurAmount(Integer purAmount) {
		this.purAmount = purAmount;
	}

	@Column(name = "del_code", length = 36)
	public String getDelCode() {
		return this.delCode;
	}

	public void setDelCode(String delCode) {
		this.delCode = delCode;
	}

	@Column(name = "is_longtime_plan")
	public Short getIsLongtimePlan() {
		return this.isLongtimePlan;
	}

	public void setIsLongtimePlan(Short isLongtimePlan) {
		this.isLongtimePlan = isLongtimePlan;
	}

	@Column(name = "bak_reason", length = 1024)
	public String getBakReason() {
		return this.bakReason;
	}

	public void setBakReason(String bakReason) {
		this.bakReason = bakReason;
	}

	@Column(name = "remark", length = 2048)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "bak_submit_datetime", length = 19)
	public Date getBakSubmitDatetime() {
		return this.bakSubmitDatetime;
	}

	public void setBakSubmitDatetime(Date bakSubmitDatetime) {
		this.bakSubmitDatetime = bakSubmitDatetime;
	}

	@Column(name = "bak_submit_user", length = 36)
	public String getBakSubmitUser() {
		return this.bakSubmitUser;
	}

	public void setBakSubmitUser(String bakSubmitUser) {
		this.bakSubmitUser = bakSubmitUser;
	}

	@Column(name = "audit_status")
	public Short getAuditStatus() {
		return this.auditStatus;
	}

	public void setAuditStatus(Short auditStatus) {
		this.auditStatus = auditStatus;
	}

	@Column(name = "audit_remaks", length = 1024)
	public String getAuditRemaks() {
		return this.auditRemaks;
	}

	public void setAuditRemaks(String auditRemaks) {
		this.auditRemaks = auditRemaks;
	}

	@Column(name = "audit_datetime", length = 19)
	public Date getAuditDatetime() {
		return this.auditDatetime;
	}

	public void setAuditDatetime(Date auditDatetime) {
		this.auditDatetime = auditDatetime;
	}

	@Column(name = "audit_user", length = 36)
	public String getAuditUser() {
		return this.auditUser;
	}

	public void setAuditUser(String auditUser) {
		this.auditUser = auditUser;
	}

	@Transient
	public Integer getOldStatus() {
		return oldStatus;
	}

	public void setOldStatus(Integer oldStatus) {
		this.oldStatus = oldStatus;
	}

}